#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
    @文件名      :Menus.py
    @时间       :2024/5/12 上午9:54
    @作者       :刘继泽
"""

import maya.cmds as cmds
import maya.mel as mel
import os, sys

rcMenuPublic = None


def createPublicMenu():
	global rcMenuPubfic
	mainWindow = mel.eval('global string $gMainWindow, $temp=$gMainWindow;')
	if not cmds.menu("UEPIPLEPUBLCMENU", g=True, exists=True):
		rcMenuPublic = cmds.menu("UEPIPLEPUBLCMENU", l=u"UE Pipeline", tearOff=1, p=mainWindow)
	else:
		rcMenuPublic = "UEPIPLEPUBLCMENU"

def Rs_Scripts():

	print("general loaded")
	global rcMenuPublic
	createPublicMenu()
	rcGM=cmds.menultem(l=u"面用Ismettearoff-lp=rcMenuPublic)")
	cmds.menultem(l = u"金名营理器",i="renamelootBMP",c="import RNTl_RsRenamelools2018 as renameT; reload (renameT); renameT.RNTL_RSRenMainCom()",P=rcGM)
	cmds.menultem(l = u"重名检查工具",i="renamelootBMP",c="import RNTl_RsRenamelools2018 as renameT; reload (renameT); renameT.RNTL_RSRenMainCom()",P=rcGM)
	cmds.menultem(l = u"场最优化具",i = "scenseOptmize.BMP",c = "import Mo smartMollink2018 as smartlink; reload (smartlink); smartLink.MO link_MainCom()",P=rcGM)
	cmds.menultem(l = u"关联物体编辑器",i = "scenseoptmize.BMP",c = "impont BRil_Breakinstance2018 as breakin; reload (lbreakin); breakin.BRlT_breakinstanceMainCom()",P = rcGM)
	cmds.menultem(l = u"修正折分道县tool",c="impor replaceNewProps2018 as RepNewProps; reload()RepNewProps;RepNewProps.refProsWin"(),p=rcGM)
	cmds.menultem(l =u"长名检査工具", c = "impor.longNamecheck as inc;reload(inc);incIncRunWin()")
	cmds.setParent("..",m = 1)
